package com.zzxx.shooter;

import java.awt.image.BufferedImage;

public class BigPlane extends FlyingObject implements Award,Enemy{

    private int speed;
    private int type;

    public BigPlane(){
        x = (int)(Math.random()*ShootGame.WIDTH);
        y = 0;
        image = ShootGame.bigap0;
        width = image.getWidth();
        height = image.getHeight();
        speed = 1;
        life = 4;
        type = (int) Math.round(Math.random());
        emberImages = new BufferedImage[]{ShootGame.bigplane_ember0,
                ShootGame.bigplane_ember1,
                ShootGame.bigplane_ember2,
                ShootGame.bigplane_ember3};
    }


    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    @Override
    public int getType() {
        return type;
    }

    @Override
    public int getScore() {
        return 20;
    }

    @Override
    public boolean outOfBound() {
        return y>650;
    }

    @Override
    public void step() {
        this.y += speed;
    }
}
